package com.tcwlkj.uuService.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.tcwlkj.uuService.R;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/11/21 0021.
 */

public class PopupActivity extends BaseActivity {
    @Bind(R.id.web_xieyi)
    WebView webview;
    @Bind(R.id.iv_me)
    ImageView iv_me;
    @Bind(R.id.tv_me)
    TextView tv_me;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_xie_yi);
        ButterKnife.bind(this);
        iv_me.setVisibility(View.GONE);
        tv_me.setVisibility(View.GONE);
        String name=getIntent().getStringExtra("name");
        String url=getIntent().getStringExtra("url");
        changeTitle(name);
        WebSettings webSettings = webview.getSettings();
        webSettings.setJavaScriptEnabled(true);
        //设置可以访问文件
        webSettings.setAllowFileAccess(true);
        //设置支持缩放
        webSettings.setBuiltInZoomControls(true);

        webview.loadUrl(url);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
    }
}
